package leetcode.code502;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution502 implements IDebug {

	public abstract int findMaximizedCapital(int k, int w, int[] profits, int[] capital);

	@Override
	public void debug1() {
		int k = 2;
		int w = 0;
		String str1 = "[1,2,3]";
		String str2 = "[0,1,1]";
		int expect = 4;
		this.debug(k, w, str1, str2, expect);
	}

	private void debug(int k, int w, String str1, String str2, int expect) {
		int[] profits = HelpDebug.str2array3(str1);
		int[] capital = HelpDebug.str2array3(str2);
		int result = this.findMaximizedCapital(k, w, profits, capital);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		int k = 3;
		int w = 0;
		String str1 = "[1,2,3]";
		String str2 = "[0,1,2]";
		int expect = 6;
		this.debug(k, w, str1, str2, expect);
	}

	@Override
	public void debug3() {
		int k = 2;
		int w = 0;
		String str1 = "[9,10,3]";
		String str2 = "[0,8,4]";
		int expect = 6;
		this.debug(k, w, str1, str2, expect);
	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub
		int k = 1;
		int w = 0;
		String str1 = "[1,2,3]";
		String str2 = "[1,1,2]";
		int expect = 0;
		this.debug(k, w, str1, str2, expect);
	}

}
